﻿using System;
using System.Web;
using System.Configuration;
namespace Util.Configuration
{
    /// <summary>
    /// 核心层，配置，网站配置信息
    /// Key：加密关键字，Schema：数据库默认架构，Prefix：表的前缀
    /// </summary>
    public class WebConfiguration
    {
        #region 网站核心配置
        /// <summary>
        /// 加密关键字
        /// </summary>
        public static string Key = string.IsNullOrEmpty(ConfigurationManager.AppSettings["key"])
            ? "omp" : ConfigurationManager.AppSettings["key"];
        /// <summary>
        /// 用session还是cookie存储后台登录信息
        /// </summary>
        public static string SorC = string.IsNullOrEmpty(ConfigurationManager.AppSettings["sc"])
            ? "s" : ConfigurationManager.AppSettings["sc"];
        /// <summary>
        /// 网站根目录
        /// </summary>
        public static string WebRoot = ConfigurationManager.AppSettings["webroot"];
        /// <summary>
        /// 管理后台根目录
        /// </summary>
        public static string AdminRoot = ConfigurationManager.AppSettings["admin"];
        /// <summary>
        /// 网站的http地址
        /// </summary>
        public static string WebUri = ConfigurationManager.AppSettings["uri"];
        #endregion               

        #region 网站个性化配置
        /// <summary>
        /// 网站名称
        /// </summary>
        public static string SiteName = ConfigurationManager.AppSettings["sitname"];
        /// <summary>
        /// 版权声明
        /// </summary>
        public static string Copyright = ConfigurationManager.AppSettings["copyright"];
        /// <summary>
        /// 邮件服务器
        /// </summary>
        public static string MailSmtp = ConfigurationManager.AppSettings["smtp"];
        /// <summary>
        /// 邮件用户名
        /// </summary>
        public static string MailUsername = ConfigurationManager.AppSettings["smtpuser"];
        /// <summary>
        /// 邮件密码
        /// </summary>
        public static string MailPassword = ConfigurationManager.AppSettings["smtppass"];
        /// <summary>
        /// 百度地图key
        /// </summary>
        public static string BaiduMapKey = ConfigurationManager.AppSettings["baidumapkey"];
        #endregion        
    }
}
